<template>
    <div>
      <h1>用户登录页面</h1>

           <tr>
 用户名<el-input v-model="userinfo.username" placeholder="用户名" style="width: 400px" ></el-input>
      
       密码<el-input placeholder="请输入密码" v-model="userinfo.passwd"  style="width: 400px" show-password></el-input>
        
           </tr>

            <tr>
     权限
        <el-select v-model="userinfo.role" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
        </el-select>
              
               <img src="http://demo.ruoyi.vip/captcha/captchaImage?type=math&s=0.2661691542964031"
                   style="width: 100px;">
                   <el-input v-model="userinfo.picnum" placeholder="用户名" style="width: 400px" ></el-input>
      
            </tr>
        <el-button v-on:click="login">登录</el-button>
 
 
 </div>
</template>


<script>
export default {
    
    methods: {
        login(){
            let userinfonew = this.userinfo;
             this.$store.commit('setInfo', userinfonew);
               this.$router.push("/account") ;
            alert("111") ;
        }

    },
    
   data() {
      return {
        activeName: 'first',
        userinfo: {username:'',passwd:''},
         options: [{
          value: true,
          label: '管理员'
        }, {
          value: false,
          label: '普通用户'
        }],

      };
    },

    setup() {
        
    },
}
</script>